
        var reobj = null;
        var http_request = false;
if(window.XMLHttpRequest)
{
        http_request=new XMLHttpRequest();    
        if(http_request.overrideMimeType)
        {    
                http_request.overrideMimeType("text/xml");    
        }
}else if(window.ActiveXObject)
{    
        try
        {    
                http_request=new ActiveXObject("Msxml2.XMLHttp");   
        }catch(e)
        {      
                try
                {    
                        http_request=new ActiveXobject("Microsoft.XMLHttp");  
                }catch(e)
                {}     
        }    
}  
function send_request(url){  
        if(!http_request)
        {    
                window.alert("创建XMLHttp对象失败！"); 
                return false;   
        }
        http_request.open("GET",url,true);
        http_request.onreadystatechange=processrequest;http_request.send(null);}
//处理返回信息的函数
function processrequest()
{   
        if(http_request.readyState==4){ //判断对象状态     
                if(http_request.status==200){ //信息已成功返回，开始处理信息     
                        document.getElementById(reobj).innerHTML=http_request.responseText;
                }else
                {     
                        alert("您所请求的页面不正常！");     
                }   
        }
}   
function getclass(obj)
{   
        var pid=document.addform.departid.value;
        document.getElementById(obj).innerHTML="<option>loading...</option>";   
        reobj=obj;    
        send_request("ajax/doclass.php?pid="+pid);   
}

